package ltd.trackan.aitextdialogue.config;

import com.github.xiaoymin.knife4j.spring.annotations.EnableKnife4j;
import io.swagger.v3.oas.models.ExternalDocumentation;
import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.info.Contact;
import io.swagger.v3.oas.models.info.Info;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author wxa
 */
@Configuration
@EnableKnife4j
public class Knife4jConfig {

    @Bean
    public OpenAPI springShopOpenAPI() {
        return new OpenAPI()
                .info(new Info()
                        // 接口文档标题
                        .title("DeepSeek的Demo")
                        // 接口文档描述
                        .description("文档的详细描述")
                        // 接口文档版本
                        .version("V1.0.0")
                        // 开发者联系方式
                        .contact(new Contact().name("wxa").url("https://github.com/Andwxa"))).externalDocs(new ExternalDocumentation()
                        // 额外补充链接
                        .url("https://github.com/Flying9001/springBootDemo/demo-knife4j-openapi3")
                );
    }

}